package com.lzw.breezeNovel.WebAdmin.controller;


import com.lzw.breezeNovel.WebAdmin.service.StatisticService;
import com.lzw.breezeNovel.WebAdmin.vo.StatisticsVo;
import com.lzw.breezeNovel.common.result.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 统计信息
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("/admin/statistic")
public class StatisticController {
    /**
     * 注入service
     */
    @Resource
    private StatisticService statisticService;

    /**
     * 统计信息
     */
    @RequestMapping("/getStatistic")
    public Result<StatisticsVo> statistic() {
        StatisticsVo statistic =  statisticService.getStatisticInfo();
        return Result.ok(statistic);
    }

}
